<template>
  <div>
    <input @keydown.enter="enterFn" type="text">
    <hr>
     <input @keydown.esc="escFn" type="text">
  </div>
</template>

<script>
export default {
  name: 'VuecliTwoApp',

  data() {
    return {
      
    };
  },

  mounted() {
    
  },

  methods: {
    enterFn(){
      console.log('enter被占用');
    },
    escFn(){
console.log('esc被占用');
    }
  },
};
</script>

<style lang="scss" scoped>

</style>